import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/view/login/login' // -登入页面目前特殊处理

// -路由分发

const indexSanHui = () =>import('../view/sanhui-erp/');
var sanhuiRouter = require('./sanhui-erp/index').default;

var routerss = [{
		path: '/',
		redirect: '/login',
		name: '',
		component: Login,
	},
	{
		path: '/login',
		name: 'login',
		component: Login,
	},
	{
		path: '/home',
		name: 'home',
		component: indexSanHui,
		children: sanhuiRouter,
	}
];

Vue.use(Router)

export default new Router({
	mode: 'hash',
	routes: routerss,
	scrollBehavior() {
		// -scroll event
	}
})